/*
 * @作者: 沙昊
 * @邮箱: shahao@zju.edu.cn
 * @功能: 
 * @包含算法: 
 * Copyright (c) 2023 by 沙昊, All Rights Reserved. 
 */

class Singleton{
private:
    static Singleton* instance;
    static std::mutex mtx;
    Singleton(){}

public:
    static Singleton* getIntance(){
        if(instance == nullptr){
            std::lock_guard<std::mutex> lock(mtx);
            instance = new Singleton();
        }
        return instance;
    }


}